package com.wuliu.util;


import java.sql.Connection;
import java.sql.DriverManager;

public class Jdbc {
    private Connection connection;
    public Jdbc() {
        try {
            Class.forName("com.mysql.cj.jdbc.Driver");
            String url = "jdbc:mysql://localhost:3306/logistics?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true";
            connection = DriverManager.getConnection(url,"root","root");

        }catch (Exception e){
            e.printStackTrace();
        }
    }
    public Connection connection(){
        return connection;
    }
}
